package com.arron.absfactory.order;

import com.arron.absfactory.pizza.BJCheesePizza;
import com.arron.absfactory.pizza.BJPepperPizza;
import com.arron.absfactory.pizza.Pizza;
//工厂子类
public class BJFactory implements AbsFactory{
    @Override
    public Pizza createPizza(String orderType) {
        System.out.println("~使用的是抽象工厂模式~");
        Pizza pizza =null;
        if(orderType.equalsIgnoreCase("cheese"))
            pizza = new BJCheesePizza();
        else if(orderType.equalsIgnoreCase("pepper"))
            pizza = new BJPepperPizza();

        return pizza;
    }
}
